package com.zero.domain;

import com.zero.common.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
    * 单车表
    */
@Data
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder    // 与@Builder的区别：子类可以使用链式方法 给父类属性赋值
public class Bicycle extends BaseEntity {
    /**
    * 单车ID 主键
    */
    private Integer bicycleId;

    /**
    * 会员ID
    */
    private Integer userId;

    /**
    * 单车编号
    */
    private String bicycleSn;

    /**
    * 单车状态(0:未使用   1:使用中)
    */
    private Integer status;



    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("bicycleId", getBicycleId())
                .append("userId", getUserId())
                .append("bicycleSn", getBicycleSn())
                .append("status", getStatus())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .toString();
    }
}
